#include <bits/stdc++.h>
using namespace std;
int n;
int a, b;
string s[1001];
int main() {
    cin >> n;
    cin >> a >> b;
    double x = (double)b / a;
    double y;
    for (int i = 1; i < n; i++) {
        cin >> a >> b;
        y = (double)b / a;

        if (y - x > 0.05) {
            s[i] = "better";
        } else if (x - y > 0.05) {
            s[i] = "worse";
        } else {
            s[i] = "same";
        }
    }
    for (int i = 1; i < n; i++) {
        cout << s[i] << endl;
    }
    return 0;
}